package jstl;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.TagSupport;

import org.apache.log4j.Logger;

import db.dbo.DictionariesDBO;

public class Translate extends TagSupport{
	int dictID;
	String word;
	@Override
	public int doStartTag() throws JspException {
		DictionariesDBO dictDBO = new DictionariesDBO();
		JspWriter out = pageContext.getOut();
		try {
			out.println(dictDBO.lookupWord(dictID, word));
		} catch (IOException e) {
			
		}
		return (SKIP_BODY);
	}
	public int getDictID() {
		return dictID;
	}
	public void setDictID(int dictID) {
		this.dictID = dictID;
	}
	public String getWord() {
		return word;
	}
	public void setWord(String word) {
		this.word = word;
	}
}
